package com.woniu.liuzhougov.authorityControl.utils;

import java.util.List;

/**
 * @version 1.0
 * @Author zhuxinpan
 * @ClassName TreeTableResult
 * @Description 表格数据封装, 返回表格数据
 * @Date 2019-4-29 16:34
 */
public class TreeTableResult<T> {
    private Integer code;
    private String msg;
    private List<T> data;

    public static TreeTableResult getTableResult(List data) {
        return new TreeTableResult(0, "ok", data);
    }

    public TreeTableResult() {
    }

    public TreeTableResult(Integer code, String msg, List<T> data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "TreeTableResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
